"""
py2app构建脚本 - 用于打包macOS应用
"""

from setuptools import setup

APP = ['app.py']
DATA_FILES = ['icons']
OPTIONS = {
    'argv_emulation': False,
    'iconfile': 'icons/app_icon.icns',
    'plist': {
        'CFBundleName': 'PyQt5桌面应用',
        'CFBundleDisplayName': 'PyQt5桌面应用',
        'CFBundleGetInfoString': 'PyQt5桌面应用示例',
        'CFBundleIdentifier': 'com.example.pyqtapp',
        'CFBundleVersion': '1.0.0',
        'CFBundleShortVersionString': '1.0.0',
        'NSHumanReadableCopyright': '© 2023',
        'NSHighResolutionCapable': True,
    },
    'packages': ['PyQt5'],
    'includes': ['sip'],
    'excludes': ['matplotlib', 'numpy', 'scipy', 'pandas'],
}

setup(
    name='PyQt5桌面应用',
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)